<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8" />
	<meta name="author" content="Liang wei">
    <meta name="viewport" content="width= device-width , user-scalable=no,initial-scale=1.0" />
	<link rel="stylesheet" href="css/header.css" />
	<link rel="stylesheet" href="css/lunbo.css" />
	<link rel="stylesheet"  href="css/base.css"/>
	<link rel="stylesheet" href="css/index.css" />
	<script type="text/javascript" src="js/lunbo.js" ></script>
	<script type="text/javascript" src="js/jquery-3.1.1.js" ></script>
	<script type="text/javascript" src="js/vue.js" ></script>
	<!--<script type="text/javascript" src="js/v.js" ></script>-->
	<link rel="stylesheet" href="css/footer.css" />
	
	<style>
	</style>
	</head>
	<body>
		<div>
			
			
		<div>
		<header>
				<img src="img/logo.png"  />
				<form class="search" action="">
					<input class="search_text" type="text" placeholder="搜索" />
				</form>
				<!--if(username==null){
					<a id="login" href="login.html">登录</a>
				}
				else{
					<a id="login" href="#">username</a>
				}-->
		<a id="login" href="login.html">登录</a>
				
		</header>
    	
  
    	
   </div>
		 <div class="hm_banner">
            <ul class="clearfix">
                <!--<li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb1" alt=""/></a></li>
                <li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb2" alt=""/></a></li>
                <li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb3" alt=""/></a></li>
                <li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb1" alt=""/></a></li>
                <li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb2" alt=""/></a></li>
                <li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb3" alt=""/></a></li>
                <li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb1" alt=""/></a></li>
                <li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb2" alt=""/></a></li>
          		<li><a href="#"><img :src="'http://172.24.10.175/workout/Uploads/'+thumb3" alt=""/></a></li>-->
          		<li><a href="#"><img src="img/轮播1.jpg"  alt=""/></a></li>
                <li><a href="#"><img src="img/轮播2.jpg" alt=""/></a></li>
                <li><a href="#"><img src="img/轮播3.jpg" alt=""/></a></li>
                <li><a href="#"><img src="img/轮播1.jpg" alt=""/></a></li>
                <li><a href="#"><img src="img/轮播2.jpg" alt=""/></a></li>
                <li><a href="#"><img src="img/轮播3.jpg" alt=""/></a></li>
                <li><a href="#"><img src="img/轮播1.jpg" alt=""/></a></li>
                <li><a href="#"><img src="img/轮播2.jpg" alt=""/></a></li>
          		<li><a href="#"><img src="img/轮播2.jpg" alt=""/></a></li>
              
            </ul>
            <ul>
                <li class="now"></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>
        </div>
        
        
        

        <div id="activity">
			  <p class="activity_title">精彩活动</p>
			  <ul class="activity-list">
				<li class="activity-list-item" v-for="item in activityList">
					<a :href="'index精彩.html?id='+item.id">
				   
				        <img :src="'http://172.24.10.175/workout/Uploads/'+item.thumb" />
					    <div>{{item.activity_name}}</div>
					</a>
				</li>					 			
			   </ul>
			 
			 
			 
			 <p class="activity_title">权威大师</p>
			 <ul class="activity-list">
				 <li class="activity-list-item" v-for="item in masterList">
				 	<a :href="'index权威.html?id='+item.id">
				 	  <img :src="'http://172.24.10.175/workout/Uploads/'+item.thumb" />
				
					  <div>{{item.realname}}</div>
					 </a>
				 </li>					 
			 </ul>
			 
			 
			 
			 
			 <p class="activity_title">最近比赛</p>
			 <ul class="activity-list">
				 <li class="activity-list-item" v-for="item in contestList">
				 	 <a :href="'index最近.html?id='+item.id">
					
					   <img :src="'http://172.24.10.175/workout/Uploads/'+item.thumb" />
					   <div>{{item.name}}</div>
					 </a>
				 </li>				
			 </ul>
		   </div>
		 </div>
          
       
      </div>
       
      
        	
        	
      
        </div>
     
     
	
	<!--尾栏-->
	<div class="footer_box">
		
	  <a href="train2.html"><img src="img/步数.png"/>训练</a>     
      <a href="club.html"><img src="img/运动.png"/>俱乐部</a>
      <a href="index.html"><img src="img/设备.png"/>约建</a>
      <a href="showpicture.html"><img src="img/活动.png"/>晒图</a>   
      <a href="wode.html"><img src="img/首页.png"/>我的</a>
    </div>
	
	
	
	</footer>
	
	
	<script type="text/javascript" src="js/common.js" ></script>
	
	<script>
		var username=window.sessionStorage.getItem('userinfo');
//		alert(username);
		var activity=new Vue({
				el:"#activity",
				data:{
					activityList:[],
					masterList:[],	
					contestList:[]
				 },
				mounted:function(){
					this.getData();
				},
				methods:{
					getData:function(){
					    $.ajax({
				           type:"get",
				           url:"http://172.24.10.175/workout/api.php/lists/mod/activity",
				           async:true,
				           dataType:"jsonp",
				           success:function(data){	      	   		          
	      	   		              for(var i=0;i<data.length;i++){
	      	   		              	activity.activityList.push(data[i]);
	      	   		              }
	      	   	           }
			            });

			            $.ajax({
				           type:"get",
				           url:"http://172.24.10.175/workout/api.php/lists/mod/master",
				           async:true,
				           dataType:"jsonp",
				           success:function(data){	      	   		          
	      	   		              for(var i=0;i<data.length;i++){
	      	   		              	activity.masterList.push(data[i]);
	      	   		              }
	      	   	           }
			            });	
			            	
			            $.ajax({
				           type:"get",
				           url:"http://172.24.10.175/workout/api.php/lists/mod/contest",
				           async:true,
				           dataType:"jsonp",
				           success:function(data){	      	   		          
	      	   		              for(var i=0;i<data.length;i++){
	      	   		              	activity.contestList.push(data[i]);
	      	   		              }
	      	   	           }
			            });		
					}
				}
			});
		
		
		
//		var hm_banner=new Vue({
//				el:"#hm_banner",
//				data:{
//					thumb1:"",
//					thumb2:"",	
//					thumb3:""
//				 },
//				mounted:function(){
//					this.getData1();
//				},
//				methods:{
//					getData1:function(){
//						var _this=this;
//					    $.ajax({
//				           type:"get",
//				           url:"http://172.24.10.175/workout/api.php/lists/mod/acmrecom",
//				           async:true,
//				           dataType:"jsonp",
//				           success:function(data1){	      	   		          
//	      	   		            _this.thumb1=data1[0].thumb;
//	      	   		            _this.thumb2=data1[1].thumb;
//	      	   		            _this.thumb3=data1[2].thumb;
//		 						
//	      	   	           }
//			            });
////			            dump($data1[]);
////	                console.log(data1[]);
//					}
//				}
//			});
		
		
		
		
		
	</script>
	</body>
	

</html>
